#Skripta ki skrbi za nadgradnjo skript
import System
import System.Threading
import clr
import time
import sys
#sys.path.append("c:\\Program Files (x86)\\IronPython 2.7\\Lib\\")

from System.IO import Directory, StreamReader
from System.Text.RegularExpressions import Regex
from ftplib import FTP


def nadgradi():
        ftp = FTP('iete01', 'anonymous', 'iskratel')
        ftp.cwd("/skripte/")
        stavek = "PRIDOBIL NASLEDNJE SKRIPTE: "

        for filename in ftp.nlst("*.py"):
            fhandle = open(filename, 'wb')
            #print 'Getting ' + filename
            ftp.retrbinary('RETR ' + filename, fhandle.write)
            stavek += "%s " %filename
            fhandle.close()
        ftp.quit()
        print(stavek)
